package behavior.strategy;

public class Context {
    private Statement statement;
    public Context(){}
    public Context(Statement initalStatement){
        statement = initalStatement;
    }
    public Context setStatement(Statement statement){
        this.statement = statement;
        return this;
    }

    public void runStrategy(String[] values){
        if(statement == null) throw new RuntimeException("No Strategy found.");
        System.out.println(this.statement.buildStatement(values));
    }

    public enum Template{
        BETWEEN(1," and value > %s and value < %s "),
        GREATER(2," and value > %s ");
        int type;
        String template;
        Template(int t, String s){
            type = t;
            template = s;
        }

        public int getType() {
            return type;
        }

        public String getTemplate() {
            return template;
        }
    }

}
